import request from '@/utils/request'
//新增
export const saveRole = (role) => request.post('/role/save', role);
//修改
export const updateRole = (data) => request.put('/role', data);

//根据id查询
export const getRoleById = (id) => request.get(`/role/${id}`);
//删除
export const deleteRole = (id) => request.delete(`/role/${id}`);
//分页查询
export const getRolePage = (pageNo, pageSize) => request.get(`/role/page/${pageNo}/${pageSize}`);
//获取角色权限
export const getRoleAuth = (roleId) => request.get(`/role/auth/${roleId}`);
//保存角色权限
export const saveRoleAuth = (data) => request.put(`/role/auth`, data);